import { createBrowserRouter } from "react-router-dom";
import App from "@/App.jsx"; // 导入App作为根
import Layout from "@/pages/layout/Layout.jsx";
import Month from "@/pages/layout/Month.jsx";
import Year from "@/pages/layout/Year.jsx";
import New from "@/pages/new/New.jsx";

const router = createBrowserRouter([
  {
    path: "/",
    element: <App />,
    children: [
      {
        path: "layout",
        element: <Layout />,
        children: [
          {
            path: "month",
            element: <Month />,
          },
          {
            path: "year",
            element: <Year />,
          },
        ],
      },
      {
        path: "new",
        element: <New />,
      },
    ],
  },
]);

export default router;
